package uppacket

import (
	"gitee.com/yanwc/ebike-xiaoan-device/internal/field"
	"gitee.com/yanwc/ebike-xiaoan-device/internal/frame"

	"github.com/panjf2000/gnet"
)

type IUpPacket interface {
	Do(frame.IFrame, gnet.Conn) ([]byte, gnet.Action, error)
}

var Packets = map[field.CommandWord]IUpPacket{
	field.WildCommandWord:      &WildPacket{},
	field.HeartBeatCommandWord: &HeartBeatPacket{},
	field.WarnCommandWord:      &EventNotifyPacket{},
	field.StatusCommandWord:    &StatusNotifyPacket{},
}
